package com.pro.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;

/**
 * ClassName:jsCarousel
 * Package:com.pro.pojo
 * Description: 轮播图管理表
 *
 * @Date:2021/11/12 下午 7:42
 * @Author: WYH
 */
public class JsCarousel {
    private Integer carouselId;//主键id
    private String imgAddress;//图片url路径
    private String imgTitle;//图片标题
    private String imgType;//图片类型
    private String trueName;
    private String bannerName;//轮播图名称

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startDate;//开始时间

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expireDate;//到期时间

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;//更新时间

    private Integer display;//是否显示，2显示，3不显示
    private Integer serialNumber;//序号
    private String describe;//描述
    private String createId;//创建人
    private String remarks;//备注

    public JsCarousel() {
    }

    public JsCarousel(Integer carouselId, String imgAddress, String imgTitle, String imgType, String trueName, String bannerName, Date startDate, Date expireDate, Date updateDate, Integer display, Integer serialNumber, String describe, String createId, String remarks) {
        this.carouselId = carouselId;
        this.imgAddress = imgAddress;
        this.imgTitle = imgTitle;
        this.imgType = imgType;
        this.trueName = trueName;
        this.bannerName = bannerName;
        this.startDate = startDate;
        this.expireDate = expireDate;
        this.updateDate = updateDate;
        this.display = display;
        this.serialNumber = serialNumber;
        this.describe = describe;
        this.createId = createId;
        this.remarks = remarks;
    }

    public Integer getCarouselId() {
        return carouselId;
    }

    public String getImgAddress() {
        return imgAddress;
    }

    public String getImgTitle() {
        return imgTitle;
    }

    public String getImgType() {
        return imgType;
    }

    public String getTrueName() {
        return trueName;
    }

    public String getBannerName() {
        return bannerName;
    }

    public Date getStartDate() {
        return startDate;
    }

    public Date getExpireDate() {
        return expireDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public Integer getDisplay() {
        return display;
    }

    public Integer getSerialNumber() {
        return serialNumber;
    }

    public String getDescribe() {
        return describe;
    }

    public String getCreateId() {
        return createId;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setCarouselId(Integer carouselId) {
        this.carouselId = carouselId;
    }

    public void setImgAddress(String imgAddress) {
        this.imgAddress = imgAddress;
    }

    public void setImgTitle(String imgTitle) {
        this.imgTitle = imgTitle;
    }

    public void setImgType(String imgType) {
        this.imgType = imgType;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public void setBannerName(String bannerName) {
        this.bannerName = bannerName;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public void setDisplay(Integer display) {
        this.display = display;
    }

    public void setSerialNumber(Integer serialNumber) {
        this.serialNumber = serialNumber;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JsCarousel that = (JsCarousel) o;
        return Objects.equals(carouselId, that.carouselId) &&
                Objects.equals(imgAddress, that.imgAddress) &&
                Objects.equals(imgTitle, that.imgTitle) &&
                Objects.equals(imgType, that.imgType) &&
                Objects.equals(trueName, that.trueName) &&
                Objects.equals(bannerName, that.bannerName) &&
                Objects.equals(startDate, that.startDate) &&
                Objects.equals(expireDate, that.expireDate) &&
                Objects.equals(updateDate, that.updateDate) &&
                Objects.equals(display, that.display) &&
                Objects.equals(serialNumber, that.serialNumber) &&
                Objects.equals(describe, that.describe) &&
                Objects.equals(createId, that.createId) &&
                Objects.equals(remarks, that.remarks);
    }

    @Override
    public int hashCode() {
        return Objects.hash(carouselId, imgAddress, imgTitle, imgType, trueName, bannerName, startDate, expireDate, updateDate, display, serialNumber, describe, createId, remarks);
    }

    @Override
    public String toString() {
        return "JsCarousel{" +
                "carouselId=" + carouselId +
                ", imgAddress='" + imgAddress + '\'' +
                ", imgTitle='" + imgTitle + '\'' +
                ", imgType='" + imgType + '\'' +
                ", trueName='" + trueName + '\'' +
                ", bannerName='" + bannerName + '\'' +
                ", startDate=" + startDate +
                ", expireDate=" + expireDate +
                ", updateDate=" + updateDate +
                ", display=" + display +
                ", serialNumber=" + serialNumber +
                ", describe='" + describe + '\'' +
                ", createId='" + createId + '\'' +
                ", remarks='" + remarks + '\'' +
                '}';
    }
}
